Skip to content

docs: add .nvmrc, .tool-versions, and env setup guide (closes #579)#605

Open
draycolix wants to merge 1 commit into
solana-foundation:mainfrom
draycolix:fix/579-add-version-constraint-files
Open

docs: add .nvmrc, .tool-versions, and env setup guide (closes #579)#605
draycolix wants to merge 1 commit into
solana-foundation:mainfrom
draycolix:fix/579-add-version-constraint-files

Conversation

@draycolix

Copy link
Copy Markdown

What

Adds version constraint files and an environment setup section to address inconsistent environment setup reported in #579.

Changes

  • .nvmrc — pins Node 20 (matches @types/node: ^20.9.0 devDependency)
  • .tool-versions — for asdf users: Node 20.18.0 + pnpm 10.33.0 (matches packageManager field)
  • CONTRIBUTING.md — new "Environment Setup" section explaining how to use these files with nvm/fnm/asdf + corepack

Why

Issue #579 reports examples failing due to:

  • No .nvmrc / .tool-versions / Docker for consistent environments
  • Node 23 incompatibilities
  • Anchor/Solana CLI version mismatches not documented
  • pnpm version not enforced

This PR addresses the Node and pnpm portion. Solana/Anchor versions vary per example so I intentionally did not pin them globally — users should check each example's Cargo.toml (I can add a per-example table in a follow-up if maintainers want).

Tested

  • .nvmrc works with nvm install and fnm install
  • .tool-versions works with asdf install (assuming asdf-nodejs and asdf-pnpm plugins)
  • corepack enable && corepack prepare pnpm@10.33.0 --activate installs correct pnpm

Checklist

Happy to iterate on the pnpm version or add Solana/Anchor pinning per example in a follow-up PR.

…up guide

Closes solana-foundation#579

Adds the following to address inconsistent environment setup:
- .nvmrc pinning Node 20 (matches @types/node ^20.9.0 devDependency)
- .tool-versions for asdf users pinning Node 20.18.0 + pnpm 10.33.0
- New 'Environment Setup' section in CONTRIBUTING.md explaining how to
  use these files with nvm/fnm/asdf and corepack for pnpm

Solana/Anchor versions intentionally not pinned here as they vary per
example. Users should check each example's Cargo.toml.

Refs the recurring Node 23 issues reported in solana-foundation#579 thread.

No code or test changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant